﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HXDNB.DAL
{
    public partial class Meun
    {
        public string Link
        {
            get
            {
                return !string.IsNullOrWhiteSpace(HomeTemp)
                            ? string.Format(@"{0}/{1}.html", (HomeDir ?? "").Trim('/'), string.IsNullOrWhiteSpace(IndexName) ? "Index" : IndexName)
                            : (ContentDir ?? "").Trim('/').Trim('\\');
            }
        }

        public string MLink
        {
            get
            {
                return !string.IsNullOrWhiteSpace(MobileHomeTemp)
                            ? string.Format(@"{0}/{1}.html", (HomeDir ?? "").Trim('/'), string.IsNullOrWhiteSpace(IndexName) ? "Index" : IndexName)
                            : (ContentDir ?? "").Trim('/').Trim('\\');
            }
        }
    }
}
